home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / cool / ge_cool.lha / GE_COOL2.1 / Maketeststargs < prev    next >
Text File  |  1992-06-12  |  2KB  |  98 lines

  1. #
  2. # Copyright (C) 1991 Texa Instruments Incorporated.
  3. #
  4. # Permission is granted to any individual or institution to use, copy, modify,
  5. # and distribute this software, provided that this complete copyright and
  6. # permission notice is maintained, intact, in all copies and supporting
  7. # documentation.
  8. #
  9. # Texas Instruments Incorporated provides this software "as is" without
  10. # express or implied warranty.
  11. #
  12.  
  13. # Additional tests are included with following flags:
  14. # leak = 0
  15. # speed = 0
  16. # or with environment variables
  17. # make -k all -e leak=1 
  18. # DEFINES += -DSPEED=$(speed) #-DLEAK=$(leak)  -DSPACE=1
  19. # Now that we have Purify, leaks and memory checks are done by Purify.
  20.  
  21. ERROR    = 2>&1
  22. SUMMARIZE = $(SEARCH) "Summary"
  23.  
  24. .SUFFIXES: .C .o .out .x .i
  25.  
  26. .C.o: 
  27.     $(CC) $(CCFLAGS) $(DEFINES) $(INCLUDES) $*.C
  28.  
  29. .o.x: $*.o
  30.     $(PURIFY) $(CC) -o $*.x $*.o $(LIBRARYS)
  31.  
  32. .x.out: $*.x
  33.     $*.x > $*.out $(ERROR) 
  34.  
  35.  
  36. summary: $(RESULTS)
  37.     @$(ECHO) "======================="
  38.     - @for RESULT in $(RESULTS); do \
  39.         $(SUMMARIZE) $$RESULT;\
  40.         if test "`$(SEARCH) -c "leak" $$RESULT`" != "0"; then \
  41.             $(SEARCH)  "Found" $$RESULT;\
  42.             $(ECHO) -n "Memory Access Errors: ";\
  43.             $(SEARCH) -c "Error:" $$RESULT;\
  44.             $(ECHO) -n "   Array Bound Reads: ";\
  45.             $(SEARCH) -c "(abr)" $$RESULT;\
  46.             $(ECHO) -n "   Array Bound Writes: ";\
  47.             $(SEARCH) -c "(abw)" $$RESULT;\
  48.             $(ECHO) -n "   Free Memory Reads: ";\
  49.             $(SEARCH) -c "(fmr)" $$RESULT;\
  50.             $(ECHO) -n "   Free Memory Writes: ";\
  51.             $(SEARCH) -c "(fmw)" $$RESULT;\
  52.             $(ECHO)    -n "   Uninitialized Memory Reads: ";\
  53.             $(SEARCH) -c "(umr)" $$RESULT;\
  54.         fi \
  55.         done
  56.     @$(ECHO) "======================="
  57.  
  58. $(RESULTS): $(PROGRAMS)
  59.  
  60. $(PROGRAMS): $(OBJECTS)
  61.  
  62. all: summary
  63.  
  64. allclean clean:
  65.     - $(RM) $(OBJECTS) $(PROGRAMS) $(RESULTS) $(BACKUPS) *.i
  66.  
  67. alldepend depend: $(SOURCES) $(HEADERS)
  68.     $(MKDEPEND) $(DEFINES) $(INCLUDES) $(SOURCES)
  69.  
  70. allinstall install:
  71.  
  72. alllink link:
  73.  
  74. cleanalltests:
  75.     - $(RM) $(OBJECTS) $(PROGRAMS) $(RESULTS) $(BACKUPS)
  76. cleantests:
  77.     - $(RM) $(OBJECTS) $(PROGRAMS) $(RESULTS) $(BACKUPS)
  78.  
  79.  
  80. # use these rules for debugging inside of CenterLine:
  81.  
  82. .C.i:
  83.     @$(BINDIR)/cpp \
  84.     $(DEFINES) \
  85.     -undef -B -Dc_plusplus=1 -D__cplusplus=1 -Dsun -DBSD -Dsparc -Dunix \
  86.     -I/home/oceana/software/CenterLine/c++_1.1.0-r1.0/sun4-40/include \
  87.     $(INCLUDES) \
  88.         $*.C >! $*.i
  89.     #load $*.i
  90.  
  91. load_lib load_libs load_libraries:
  92.     #load -g $(LIBRARYS) 
  93.  
  94. load_obj load_objs load_objects:
  95.     #load -g $(INCLUDES) $(OBJECTS) $(LIBRARYS)
  96.  
  97.  
  98.